<?php

include(__DIR__ . "/Database.class.php");
include(__DIR__ . "/Validate.class.php");


class Article
{
	public $id, $app;
	
	public function __construct($app, $id)
	{
		$this->id  = $id;
		$this->app = $app;
	}
	
	public function header()
    {
		include(Validate::path_validate("content/%s/header.inc.php", $this->app));
    }

	
	public function content()
	{
		$where   = array("id" => $this->id);
		$IE6     = Database::select_query("IE6", null, $where);
		include(Validate::path_validate("content/%s/content.inc.php", $this->app));
	}
	
	public function footer()
	{
		include(Validate::path_validate("content/%s/footer.inc.php", $this->app));
	}
	
	public function createPage()
	{
		echo $this->header();
		echo $this->content();
		echo $this->footer();
	}
}

?>